package cn.edu.neusoft.yuejian4.yuejian_4.model;

import android.net.wifi.aware.SubscribeConfig;
import android.widget.AutoCompleteTextView;

import java.util.List;

import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Activity;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Club;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Order;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Slideshow;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Success;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Train;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.User;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.List_TListener;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.TListener;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;

/**
 * Created by Lix on 2018/10/login_bg2.
 */

public class MyModel extends RetrofitBaseModel {

    public void userinfo(int id, TListener<User> listener){
        Call<User> call = service.userinfo(id);
        callenqueue(call,listener);
    }
    public void allorder(int uid, List_TListener<Order> listener){
        Call<List<Order>> call = service.myallorder(uid);
        callenqueue_list(call,listener);
    }
    public void endorder(int uid,List_TListener<Order> list_tListener){
        Call<List<Order>> call = service.endOrder(uid);
        callenqueue_list(call,list_tListener);
    }
    public void waitorder(int uid,List_TListener<Order> list_tListener){
        Call<List<Order>> call = service.waitOrder(uid);
        callenqueue_list(call,list_tListener);
    }
    public void delorder(int oid,TListener<Success> listener) {
        Call<Success> call = service.delorder(oid);
        callenqueue(call, listener);
    }
    public void changeOrder(int oid,TListener<Success> listener ){
        Call<Success> call = service.changeOrder(oid);
        callenqueue(call,listener);
    }
    public void mylikeclub(int uid,List_TListener<Club> listener){
        Call<List<Club>> call = service.mylikeclub(uid);
        callenqueue_list(call,listener);
    }
    //*********
    public void updateMyHeadpic(RequestBody uid, MultipartBody.Part pic, TListener<Success> listener){
        Call<Success> call = service.updateMyHeadPic(uid,pic);
        callenqueue(call,listener);
    }
    public void updateBase(int uid,String nickname,String realname,int tel,TListener<Success> listener){
        Call<Success> call = service.updateBase(uid,nickname,realname,tel);
        callenqueue(call,listener);
    }
    public void updatePassword(int uid, String password,TListener<Success> listener){
        Call<Success> call = service.updatePassword(uid,password);
        callenqueue(call,listener);
    }
    public void myShow(int uid, List_TListener<Slideshow> list_tListener){
        Call<List<Slideshow>> call = service.myshow(uid);
        callenqueue_list(call,list_tListener);
    }
    public void delMyShow(int sid,TListener<Success> listener){
        Call<Success> call = service.delMyShow(sid);
        callenqueue(call,listener);
    }
    public void mycollTrain(int uid, List_TListener<Train> list_tListener){
        Call<List<Train>> call = service.mycollTrain(uid);
        callenqueue_list(call,list_tListener);
    }
    public void mycollAct(int uid , List_TListener<Activity> list_tListener){
        Call<List<Activity>> call = service.mycollAct(uid);
        callenqueue_list(call,list_tListener);
    }
}
